import request from '@/utils/request'

export function add(data) {
  return request({
    url: `/type/add`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/type/update`,
    method: 'post',
    data
  })
}

export function list() {
  return request({
    url: `/type/list`,
    method: 'get'
  })
}

export function getById(id) {
  return request({
    url: `/type/getById?id=${id}`,
    method: 'get'
  })
}

export function del(id) {
  return request({
    url: `/type/del?id=${id}`,
    method: 'get'
  })
}
